<html><head><title>Cost functions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>cost(modtools)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   cost">
<param name="keyword" value="R:   costAVER">
<param name="keyword" value="R:   costBIN">
<param name="keyword" value="R:   costMAE">
<param name="keyword" value="R:   costMSE">
<param name="keyword" value="R:   costRMSE">
<param name="keyword" value="R:   costKappa">
<param name="keyword" value="R:   costGoodCl">
<param name="keyword" value="R:   costSlope">
<param name="keyword" value="R:   costOri">
<param name="keyword" value="R:   costR2">
<param name="keyword" value=" Cost functions">
</object>


<h2>Cost functions</h2>


<h3>Description</h3>

<p>
~~ A concise (1-5 lines) description of what the function does. ~~
</p>


<h3>Usage</h3>

<pre>
costAVER(y, yhat = 0)
costMAE(y, yhat = 0)
costMSE(y, yhat = 0)
costRMSE(y, yhat = 0)
costSlope(y, yhat)
costOri(y, yhat)
costR2(y, yhat)
costBIN(y, mu = 0, cutoff = 0.5)
costKappa(y, yhat, cutoff = 0.5)
costGoodCl(y,yhat, cutoff = 0.5)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>y</code></td>
<td>
a numerical vector corresponding to the obsevred values.</td></tr>
<tr valign="top"><td><code>yhat</code></td>
<td>
a numerical vector corresponding to the expected values.</td></tr>
<tr valign="top"><td><code>mu</code></td>
<td>
a numerical vector corresponding to the expected values.</td></tr>
<tr valign="top"><td><code>cutoff</code></td>
<td>
a numerical value in the range [0,1] corresponding to the
threshold to transform the values 'mu' into binary vector.</td></tr>
</table>

<h3>Details</h3>

<p>
~~ If necessary, more details than the description above ~~
</p>


<h3>Value</h3>

<p>
~Describe the value returned
If it is a LIST, use
</p>
<table summary="R argblock">
<tr valign="top"><td><code>comp1 </code></td>
<td>
Description of 'comp1'</td></tr>
<tr valign="top"><td><code>comp2 </code></td>
<td>
Description of 'comp2'</td></tr>
</table>
<p>

...</p>

<h3>Note</h3>

<p>
~~further notes~~
</p>
<p>
add descriptions and formula <br>
</p>


<h3>References</h3>

<p>
Davidson and Hinkley, Saporta 2006
</p>


<h3>See Also</h3>

<p>
<code><a href="SRM.html">SRM</a></code>,<code><a href="bootvalid.html">bootvalid</a></code>,<code><a onclick="findlink('boot', 'cv.glm.html')" style="text-decoration: underline; color: blue; cursor: hand">cv.glm</a></code>
</p>


<h3>Examples</h3>

<pre>
x &lt;- rnorm(20,2,5)
y &lt;- -6+x*3+rnorm(20)
lm1 &lt;- lm(y~x)
costRMSE(y,lm1$fitted)
</pre>

<script Language="JScript">
function findlink(pkg, fn) {
var Y, link;
Y = location.href.lastIndexOf("\\") + 1;
link = location.href.substring(0, Y);
link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
location.href = link;
}
</script>


<hr><div align="center">[Package <em>modtools</em> version 1.0-7 <a href="00Index.html">Index</a>]</div>

</body></html>
